package com.yeraphael.mapper;


import com.yeraphael.entity.Student;
import com.yeraphael.entity.StudentQueryParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {

    @Select("select count(*) from student where clazz_id = #{id}")
    Integer getStudentCountByClazzId(Integer id);

    List<Student> getStudents(StudentQueryParam param);


    void addStudent(Student student);

    Student getStudent(Integer id);

    void updateStudent(Student student);

    void deleteStudent(List<Integer> ids);
}
